package de.sordul.jobMaster.impl;

import javax.inject.Inject;
import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;

import de.sordul.jobMaster.JobMasterInterface;
import de.sordul.jobMaster.JobMasterService;

/**
 * REST implementation of the JobMasterInterface
 */
@Singleton
@Path("/jobmaster")
public class JobMasterInterfaceREST implements JobMasterInterface {

	@Inject
	private JobMasterService jobMasterService;
	
    @GET
    @Produces("application/json")
    @Path("/{language}/{category}")
    public String getJob(@PathParam("language") String language, @PathParam("category") String category, @Context HttpServletRequest req) {    	
    	return jobMasterService.getJob(language, category);
    }
}
